1. Field of the Invention
The present invention relates generally to computer emulation, and more particularly, to an improved system, computer program product, and method for emulating the execution of a target program comprising instructions of an instruction set of a target computer on a host computer having a different instruction set.
2. Description of the Prior Art
The idea of emulating an existing software execution environment on a hardware architecture other than the one it was designed for is not new. There are several successful emulators available today.
Some prior art emulators rely primarily on pure object code translation to port software from one machine (the target machine) to another machine (the host machine). The translation process is static. The code is translated prior to loading and executing the program. The translator produces native code of the host machine. Any residual untranslatable code of the target machine is interpreted on the host machine. Some emulators of this type will produce a mapping between native and interpreted code to facilitate the switching between the two modes of operation. Generally, pure object code translation is complex and difficult, particularly where the target and host machine instruction sets and associated architectures differ significantly. Producing correct program diagnostic information in the case of failures is extremely difficult in emulators that take this approach.
Other prior art emulators rely on purely interpretive execution, in which existing code files are directly interpreted without requiring any form of translation. Pure interpretive execution avoids some of the complexities and difficulties encountered with a pure object code translation approach. For example, producing correct program diagnostic information in the case of failures is less difficult. Generally, however, emulators that rely upon pure interpretive execution do not perform as well as emulators that rely upon pure object code translation, since interpretive execution is typically much slower than execution of native code.
Both of these types of prior art emulators go to great pains to exactly reproduce all the software visible architectural state of the target machines. This exact replication minimizes the changes to the target operating system required to support the emulation. It can, however, result in a potentially heavy run time performance penalty because the exact behavior of what are now purely fictitious hardware elements must be faithfully preserved.
Accordingly, there is a need for an emulation system and method that overcomes the aforementioned deficiencies of the “pure object code translation” and “pure interpretive execution” approaches of the prior art. The present invention satisfies this need.